1) Field of the Invention
The invention relates to a real-time clock for consumer devices having the ability to receive TV signals, and in particular to a real-time clock for a VCR and a method for implementing such a clock.
2) Background Art
Today every VCR has a clock feature for the purpose of timer recording. This clock should be as accurate as possible, so that programmed timer recording can start and stop at the correct time provided by the user.
There are several ways to implement such a clock. One method makes, for example, use of a 16 MHz crystal oscillator, a component being required by the microcontroller of the VCR. But such a 16 MHz crystal oscillator shows a frequency tolerance, so that the use of such a crystal oscillator in implementing a real-time clock results in an accuracy problem. Therefore the resulting real-time clock does not show the correct time, in other words, the real-time clock accuracy will vary. This problem can be overcome by adjusting the oscillator frequency to an acceptable range using a trimmer capacitor, so that an accuracy of one second in 24 hours will be achieved. But such a trimmer capacitor results in higher costs and its capacitance must be adjusted as a function of the real oscillator frequency.
U.S. Pat. No. 4,582,434 shows a time corrected, continuously updated clock, wherein the clock automatically scans several RF frequencies at which the coded RF timing signals are transmitted and periodically determines the timing difference between an internal timer and the received RF timing signals. Such RF timing signals are based on atomic clocks and are provided by various radio frequency transmitter stations synchronized with a master standard atomic clock. But such a time corrected, continuously updated clock needs additional electronic circuitry for the scanning of the RF signals, so that its use in consumer devices results in higher costs.
It is therefore an object of the present invention to provide a real-time clock for a consumer device being able to receive TV signals said clock having a high accuracy at comparatively low costs.
The invention is then for a clock of a consumer electronic device having a microprocessor, an oscillator with an ideal oscillation frequency (T) and a real oscillation frequency (F), the electronic device having the ability to receive TV signals,
characterized in that
the real oscillation frequency (F) of the oscillator is compared with a
timing of received signals in order to calculate the exact value of the real frequency and from this calculation corrections are made to the number of oscillations of the oscillator. Said in an other way, an interval of time is determined in the following way. This interval of time is an integer number of periods of a periodic signal included in the TV signal. Such a periodic signal can be for instance the line synchronization signal or the vertical synchronization signal or any periodic signal carried by the television signal. If the time measured with the internal oscillator, i.e., the number of oscillations of said oscillator counted during said time interval, assuming that said oscillator has the ideal frequency, is greater than the real time measured by the number of periods of the TV signal, in which case the real period of the oscillator is greater than the ideal period, the correction will be made by not taking in account an integer number of oscillations of said oscillator each time said number of real oscillations is reached. If it is the reverse, then an integer number of counts will be added to the real count each time this number of real oscillations is reached. Of course the interval of time must be large enough so that it can differ from the time measured with the real oscillator from at least one period of oscillation of the real oscillator. Normally the interval will be large enough to differ with an integer number of periods.
In the preferred embodiment, the real oscillation frequency of the oscillator is compared with the sync signals of the vertical synchronization of a TV picture.
The invention has the advantage that no extra circuitry for the detection of a RF timing signal is necessary, because, for example, in a VCR the sync signal is inherently present and the accuracy of the sync signal is sufficient high for comparison purposes. Generally, any signal which is accurate enough can be used, like teletext signals, videotext signals, and any other signal transmitted together with a TV-signal or received on another way.
The device according to the invention is more simple than devices of the prior art. It includes no capacitor to adjust the frequency of the internal oscillator nor specific circuit to extract a signal devoted to time purpose. The device according to the invention will use one input of the existing microprocessor (22) of the device to receive the pulses coming form the internal oscillator (24) and an other input to receive pulses (28) coming from an other existing circuit (20) of the device, said circuit being a circuit extracting (20) from the TV signal (26) synchronization (28) included in said signal.
Preferably the oscillator is a quartz crystal with an ideal oscillation frequency of 16 MHz. As has already been mentioned such an oscillator normally runs on a slightly different real oscillation frequency.
For the calculation of the real time, the time amount (numerical) of a just lapsed time interval based on the ideal oscillator frequency is added to the sum of the former time intervals at the end of said, just lapsed time interval. The end of an interval is determined with the real frequency of the oscillator. To compensate the effect of different real oscillation frequency additional intervals are added to the sum of the former ones if the real oscillator frequency is too low compared to the ideal oscillator frequency, because in such a case the count given by the clock is inferior to the count that would have been given if the real oscillator had an ideal frequency. If the real oscillator frequency is too high compared to the ideal oscillator frequency, adding of time intervals is set out for a definite number of intervals.
For the adding or skipping of the correct amount of additional intervals a parameter k is generated by the following relation:
k=B/(Bxe2x88x92A)=F/(Fxe2x88x92T),
wherein B is the measured time for a prescribed number of sync pulses measured with the real oscillator frequency and A is the ideal time for the to prescribed number of sync pulses based on the duration of the sync pulses.
For the calculation of the real time, i.e. the correction of the real oscillator frequency, either after k intervals the time amount of an additional interval and of the actual interval is added if the sign of k is negative, or after k intervals the adding of the actual interval, i.e. regular interval, is skipped if the sign of k is positive.
Preferably 80 vertical sync pulses are used for the measurement and the calculation of k. Further the prescribed interval is 512 xcexcs long, but a different length can be chosen according to the needs.
Moreover, the invention makes use of software to compensate for the tolerance of the oscillator, which is implemented into the microprocessor of the VCR or TV, and thus the trimmer capacitor can be replaced with a chip capacitor which is less costly.